Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #331 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 7 7
Lines 1267 1264 -3
Branches 185 184 -1
=========================================
- Hits 1267 1264 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| [ | ||
| self._device.run( | ||
| sub_program_set, | ||
| s3_destination_folder=self._s3_folder, | ||
| shots=sub_program_set.total_executables * shots_per_executable, | ||
| poll_timeout_seconds=self._poll_timeout_seconds, | ||
| poll_interval_seconds=self._poll_interval_seconds, | ||
| **self._run_kwargs, | ||
| ).result() | ||
| for sub_program_set in program_sets | ||
| ], |
There was a problem hiding this comment.
This is going to wait for each program set task to run to completion before submitting the next one. Could we first call run() on each task, and then accumulate the results here? e.g.
tasks = [self._device.run(...) for sub_program_set in program_sets]
return ProgramSetQuantumTaskResult.merge([task.result() for task in tasks], ...)
| assert run_sizes == [1, 100] | ||
|
|
||
| # One outcome per snapshot, each shots=1 measurement projected onto the mapped wires. | ||
| assert outcomes.shape == (n_snapshots, 2) |
There was a problem hiding this comment.
could we do some basic verification of the content of outcomes to ensure that the merge/split happened correctly?
| ProgramSet.zip(braket_circuits, input_sets=inputs) | ||
| if inputs | ||
| else ProgramSet(braket_circuits) |
There was a problem hiding this comment.
readability nit: these could be separate variables instead of nested calls
program_set = (
ProgramSet.zip(braket_circuits, input_sets=inputs)
if inputs
else ProgramSet(braket_circuits)
)
result = self._run_program_set(program_set, batch_shots)
return self._braket_program_set_to_pl_result(result, pl_circuits)
| # Update the tracker before raising an exception further if some circuits do not complete. | ||
| finally: | ||
| if self.tracker.active: | ||
| self._update_tracker_for_batch(task_batch, batch_shots) |
There was a problem hiding this comment.
should we be calling _update_tracker_for_batch in the program set case? It seems like today we are not.
Issue #, if available:
Description of changes:
Testing done:
Merge Checklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.General
Tests
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.